//入口
function indexRenderResult() {
	var chart1 = echarts.init($('#chart_1')[0]);
	option1 = barStr;
	option1.xAxis.data = indexData['chart1'].name
	option1.series[0].data = indexData['chart1'].data
	chart1.setOption(option1)

	chart1.on('click', function(params) {
		console.log(params.name)
	});
	
	var chart2 = echarts.init($('#chart_2')[0]);
	option2 = pieStr;
	option2.legend.data = indexData['chart2'].name
	option2.series[0].data = indexData['chart2'].data
	option2.color = piecolor4
	chart2.setOption(option2)

	var chart3 = echarts.init($('#chart_3')[0]);
	option3 = pieStr;
	option3.legend.data = indexData['chart3'].name;
	option3.legend.top = 5;
	option3.legend.itemGap = 5;
	option3.series[0].data = indexData['chart3'].data;
	option3.color = piecolor6;
	chart3.setOption(option3);

	var chart4 = echarts.init($('#chart_4')[0]);
	option4 = mapStr;
	option4.series[0].data = indexData['chart4'].data
	chart4.setOption(option4)

	chart4.on('click', function(params) {
		if(params.componentType=='series'){
			alert(params.data.name)
		}else{
			return false;
		}
	});

	var chart5 = echarts.init($('#chart_5')[0]);
	option5 = pieStr;
	option5.legend.data = indexData['chart5'].name;
	option5.legend.top = 5;
	option5.legend.itemGap = 5;
	option5.series[0].data = indexData['chart5'].data;
	option5.color = piecolor6;
	chart5.setOption(option5);

	var chart6 = echarts.init($('#chart_6')[0]);
	option6 = barStr;
	option6.xAxis.data = indexData['chart6'].name
	option6.series[0].data = indexData['chart6'].data
	chart6.setOption(option6)

	var chart7 = echarts.init($('#chart_7')[0]);
	option7 = barStr;
	option7.xAxis.data = indexData['chart7'].name
	option7.series[0].data = indexData['chart7'].data
	chart7.setOption(option7)

	var chart8 = echarts.init($('#chart_8')[0]);
	option8 = pieStr;
	option8.legend.data = indexData['chart8'].name;
	option8.series[0].data = indexData['chart8'].data;
	option8.color = piecolor4;
	chart8.setOption(option8);

	var chart9 = echarts.init($('#chart_9')[0]);
	option9 = pieStr;
	option9.legend.data = indexData['chart9'].name;
	option9.legend.top = 5;
	option9.legend.itemGap = 5;
	option9.series[0].data = indexData['chart9'].data;
	option9.color = piecolor6;
	chart9.setOption(option9);
}
//产品首页
function productRenderResult() {
	var chart1 = echarts.init($('#chart_1')[0]);
	option1 = barStr;
	option1.xAxis.data = productData['chart1'].name
	option1.series[0].data = productData['chart1'].data
	chart1.setOption(option1)

	var chart2 = echarts.init($('#chart_2')[0]);
	option2 = pieStr;
	option2.legend.data = productData['chart2'].name
	option2.series[0].data = productData['chart2'].data
	option2.color = piecolor4
	chart2.setOption(option2)

	var chart3 = echarts.init($('#chart_3')[0]);
	option3 = pieStr;
	option3.legend.data = productData['chart3'].name;
	option3.legend.top = 15;
	option3.legend.itemGap = 8;
	option3.series[0].data = productData['chart3'].data;
	option3.color = piecolor6;
	chart3.setOption(option3);

	var chart4 = echarts.init($('#chart_4')[0]);
	option4 = mapStr;
	option4.series[0].data = productData['chart4'].data
	chart4.setOption(option4)

	chart4.on('click', function(params) {
		if(params.componentType=='series'){
			alert(params.data.name)
		}else{
			return false;
		}
	});

	var chart5 = echarts.init($('#chart_5')[0]);
	option5 = barStr;
	option5.xAxis.data = productData['chart5'].name
	option5.series[0].data = productData['chart5'].data
	chart5.setOption(option5)

	var chart6 = echarts.init($('#chart_6')[0]);
	option6 = barStr;
	option6.xAxis.data = productData['chart6'].name
	option6.series[0].data = productData['chart6'].data
	chart6.setOption(option6);

	var chart7 = echarts.init($('#chart_7')[0]);
	option7 = pieStr;
	option7.legend.data = productData['chart7'].name;
	option7.legend.top = '20%';
	option7.legend.itemGap = 45;
	option7.series[0].data = productData['chart7'].data;
	option7.color = piecolor6;
	chart7.setOption(option7);
}
//产品列表
function productListResult() {
	var chart1 = echarts.init($('#chart_1')[0]);
	option1 = pieStr;
	option1.legend.data = productListData['chart1'].name;
	option1.legend.top = 25;
	option1.legend.itemGap = 8;
	option1.series[0].data = productListData['chart1'].data;
	option1.color = piecolor4;
	chart1.setOption(option1)

	var chart2 = echarts.init($('#chart_2')[0]);
	option2 = pieStr;
	option2.legend.data = productListData['chart2'].name
	option2.series[0].data = productListData['chart2'].data
	option2.legend.top = '25%';
	option2.legend.itemGap = 20;
	option2.color = piecolor4
	chart2.setOption(option2)

	var chart3 = echarts.init($('#chart_3')[0]);
	option3 = barStr;
	option3.xAxis.data = productListData['chart3'].name
	option3.series[0].data = productListData['chart3'].data
	chart3.setOption(option3);
}



//产品详情
function productDetailResult() {

	var chart4 = echarts.init($('#chart_4')[0]);
	option4 = mapStr;
	option4.series[0].data = indexData['chart4'].data
	chart4.setOption(option4)

	var chart7 = echarts.init($('#chart_7')[0]);
	option7 = barStr;
	option7.xAxis.data = productDetailsData['chart7'].name
	option7.series[0].data = productDetailsData['chart7'].data
	chart7.setOption(option7)

	var chart8 = echarts.init($('#chart_8')[0]);
	option8 = barStr;
	option8.xAxis.data = productDetailsData['chart8'].name
	option8.series[0].data = productDetailsData['chart8'].data
	chart8.setOption(option8)

	var chart9 = echarts.init($('#chart_9')[0]);
	option9 = pieStr;
	option9.legend.data = productDetailsData['chart9'].name;
	option9.legend.top = '25%';
	option9.legend.itemGap = 20;
	option9.series[0].data = productDetailsData['chart9'].data;
	option9.color = piecolor6;
	chart9.setOption(option9);
}
//用户首页
function UserRenderResult(typeStr) {
	for (var i=0;i<$(".dataTitle").length;i++) {
		$(".dataTitle").eq(i).html(UsertData[typeStr].title[i]+"<span>"+UsertData[typeStr].subhead[i]+"</span>")
	}
	if(typeStr=='User'){
		var chart1 = echarts.init($('#chart_1')[0]);
		option1 = barStr;
		option1.xAxis.data = UsertData[typeStr]['chart1'].name
		option1.series[0].data = UsertData[typeStr]['chart1'].data
		chart1.setOption(option1,{notMerge:true})
	
		var chart2 = echarts.init($('#chart_2')[0]);
		option2 = pieStr;
		option2.legend.data = UsertData[typeStr]['chart2'].name
		option2.series[0].data = UsertData[typeStr]['chart2'].data
		option2.legend.top = '25%';
		option2.legend.itemGap = 15;
		option2.color = piecolor4
		chart2.setOption(option2,{notMerge:true})
		var chart3 = echarts.init($('#chart_3')[0]);
		option3 = pieStr;
		option3.legend.data = UsertData[typeStr]['chart3'].name
		option3.series[0].data = UsertData[typeStr]['chart3'].data
		option3.legend.top = '10%';
		option3.legend.itemGap = 15;
		option3.color = piecolor4
		chart3.setOption(option3,{notMerge:true})
	
		var chart4 = echarts.init($('#chart_4')[0]);
		option4 = mapStr;
		option4.series[0].data = UsertData[typeStr]['chart4'].data
		chart4.setOption(option4,{notMerge:true})
	
		chart4.on('click', function(params) {
			if(params.componentType=='series'){
				alert(params.data.name)
			}else{
				return false;
			}
		});
	
		var chart5 = echarts.init($('#chart_5')[0]);
		option5 = barStr;
		option5.xAxis.data = UsertData[typeStr]['chart5'].name
		option5.series[0].data = UsertData[typeStr]['chart5'].data
		chart5.setOption(option5,{notMerge:true})
	
		var chart6 = echarts.init($('#chart_6')[0]);
		option6 = pieStr;
		option6.legend.data = UsertData[typeStr]['chart6'].name;
		option6.legend.top = '10%';
		option6.legend.itemGap = 15;
		option6.series[0].data = UsertData[typeStr]['chart6'].data;
		option6.color = piecolor4;
		chart6.setOption(option6,{notMerge:true});
	
		var chart7 = echarts.init($('#chart_7')[0]);
		option7 = line;
		option7.xAxis.data = UsertData[typeStr]['chart7'].name;
		option7.series[0].data = UsertData[typeStr]['chart7'].data;
		chart7.setOption(option7,{notMerge:true});
	}
	if(typeStr=='Quality'){
		var chart1 = echarts.init($('#chart_1')[0]);
		option1 = barStr;
		option1.xAxis.data = UsertData[typeStr]['chart1'].name
		option1.series[0].data = UsertData[typeStr]['chart1'].data
		chart1.setOption(option1,{notMerge:true})
	
		var chart2 = echarts.init($('#chart_2')[0]);
		option2 = pieStr;
		option2.legend.data = UsertData[typeStr]['chart2'].name
		option2.series[0].data = UsertData[typeStr]['chart2'].data
		option2.legend.top = '10%';
		option2.legend.itemGap = 15;
		option2.color = piecolor4
		chart2.setOption(option2,{notMerge:true})
		
		var chart3 = echarts.init($('#chart_3')[0]);
		option3 = pieStr;
		option3.legend.data = UsertData[typeStr]['chart3'].name
		option3.series[0].data = UsertData[typeStr]['chart3'].data
		option3.legend.top = '10%';
		option3.legend.itemGap = 15;
		option3.color = piecolor4
		chart3.setOption(option3,{notMerge:true})
	
		var chart4 = echarts.init($('#chart_4')[0]);
		option4 = mapStr;
		option4.series[0].data = UsertData[typeStr]['chart4'].data
		chart4.setOption(option4,{notMerge:true})
	
		chart4.on('click', function(params) {
			if(params.componentType=='series'){
				alert(params.data.name)
			}else{
				return false;
			}
		});
	
		var chart5 = echarts.init($('#chart_5')[0]);
		option5 = barStr;
		option5.xAxis.data = UsertData[typeStr]['chart5'].name
		option5.series[0].data = UsertData[typeStr]['chart5'].data
		chart5.setOption(option5,{notMerge:true})
	
		var chart6 = echarts.init($('#chart_6')[0]);
		option6 = pieStr;
		option6.legend.data = UsertData[typeStr]['chart6'].name;
		option6.legend.top = '10%';
		option6.legend.itemGap = 15;
		option6.series[0].data = UsertData[typeStr]['chart6'].data;
		option6.color = piecolor4;
		chart6.setOption(option6,{notMerge:true});
	
		var chart7 = echarts.init($('#chart_7')[0]);
		option7 = pieStr;
		option7.legend.data = UsertData[typeStr]['chart7'].name;
		option7.legend.top = '10%';
		option7.legend.itemGap = 15;
		option7.series[0].data = UsertData[typeStr]['chart7'].data;
		option7.color = piecolor4;
		chart7.setOption(option7,{notMerge:true});
	}
	if(typeStr=='Behavior'){
		var chart1 = echarts.init($('#chart_1')[0]);
		option1 = barStr;
		option1.xAxis.data = UsertData[typeStr]['chart1'].name
		option1.series[0].data = UsertData[typeStr]['chart1'].data
		chart1.setOption(option1,{notMerge:true})
	
		var chart2 = echarts.init($('#chart_2')[0]);
		option2 = pieStr;
		option2.legend.data = UsertData[typeStr]['chart2'].name
		option2.series[0].data = UsertData[typeStr]['chart2'].data
		option2.color = piecolor4
		chart2.setOption(option2,{notMerge:true})
	
		var chart3 = echarts.init($('#chart_3')[0]);
		option3 = barStr;
		option3.xAxis.data = UsertData[typeStr]['chart3'].name
		option3.series[0].data = UsertData[typeStr]['chart3'].data
		chart3.setOption(option3,{notMerge:true})
	
		var chart4 = echarts.init($('#chart_4')[0]);
		option4 = mapStr;
		option4.series[0].data = UsertData[typeStr]['chart4'].data
		chart4.setOption(option4,{notMerge:true})
	
		chart4.on('click', function(params) {
			if(params.componentType=='series'){
				alert(params.data.name)
			}else{
				return false;
			}
		});
	
		var chart5 = echarts.init($('#chart_5')[0]);
		option5 = barStr;
		option5.xAxis.data = UsertData[typeStr]['chart5'].name
		option5.series[0].data = UsertData[typeStr]['chart5'].data
		chart5.setOption(option5,{notMerge:true})
	
		var chart6 = echarts.init($('#chart_6')[0]);
		option6 = pieStr;
		option6.legend.data = UsertData[typeStr]['chart6'].name;
		option6.legend.top = '10%';
		option6.legend.itemGap = 15;
		option6.series[0].data = UsertData[typeStr]['chart6'].data;
		option6.color = piecolor4;
		chart6.setOption(option6,{notMerge:true});
	
		var chart7 = echarts.init($('#chart_7')[0]);
		option7 = pieStr;
		option7.legend.data = UsertData[typeStr]['chart7'].name;
		option7.legend.top = '10%';
		option7.legend.itemGap = 15;
		option7.series[0].data = UsertData[typeStr]['chart7'].data;
		option7.color = piecolor4;
		chart7.setOption(option7,{notMerge:true});
	}
}
//用户列表
function UserListResult() {
	var chart1 = echarts.init($('#chart_1')[0]);
	option1 = barStr;
	option1.xAxis.data = UserListData['chart1'].name
	option1.series[0].data = UserListData['chart1'].data
	chart1.setOption(option1)

	var chart2 = echarts.init($('#chart_2')[0]);
	option2 = pieStr;
	option2.legend.data = UserListData['chart2'].name
	option2.series[0].data = UserListData['chart2'].data
	option2.legend.top = '10%';
	option2.legend.itemGap = 15;
	option2.color = piecolor4
	chart2.setOption(option2)

	var chart3 = echarts.init($('#chart_3')[0]);
	option3 = barStr;
	option3.xAxis.data = UserListData['chart3'].name
	option3.series[0].data = UserListData['chart3'].data
	chart3.setOption(option3);
}

//家居首页
function LivingRenderResult() {
	var chart1 = echarts.init($('#chart_1')[0]);
	option1 = barStr;
	option1.xAxis.data = LivingData['chart1'].name
	option1.series[0].data = LivingData['chart1'].data
	chart1.setOption(option1,{notMerge:true})

	var chart2 = echarts.init($('#chart_2')[0]);
	option2 = pieStr;
	option2.legend.data = LivingData['chart2'].name
	option2.series[0].data = LivingData['chart2'].data
	option2.legend.top = '13%';
	option2.legend.itemGap = 10;
	option2.color = piecolor4
	chart2.setOption(option2,{notMerge:true})
	
	var chart3 = echarts.init($('#chart_3')[0]);
	option3 = pieStr;
	option3.legend.data = LivingData['chart3'].name
	option3.series[0].data = LivingData['chart3'].data
	option3.legend.top = '6%';
	option3.legend.itemGap = 10;
	option3.color = piecolor6
	chart3.setOption(option3,{notMerge:true})

	var chart4 = echarts.init($('#chart_4')[0]);
	option4 = mapStr;
	option4.series[0].data = LivingData['chart4'].data
	chart4.setOption(option4,{notMerge:true})

	chart4.on('click', function(params) {
		if(params.componentType=='series'){
			alert(params.data.name)
		}else{
			return false;
		}
	});

	var chart5 = echarts.init($('#chart_5')[0]);
	option5 = barStr;
	option5.xAxis.data = LivingData['chart5'].name
	option5.series[0].data = LivingData['chart5'].data
	chart5.setOption(option5,{notMerge:true})

	var chart6 = echarts.init($('#chart_6')[0]);
	option6 = barStr;
	option6.xAxis.data = LivingData['chart6'].name;
	option6.series[0].data = LivingData['chart6'].data;
	chart6.setOption(option6,{notMerge:true});

	var chart7 = echarts.init($('#chart_7')[0]);
	option7 = barStr;
	option7.xAxis.data = LivingData['chart7'].name;
	option7.series[0].data = LivingData['chart7'].data;
	chart7.setOption(option7,{notMerge:true});
}


//家居列表
function LivingListResult() {
	var chart1 = echarts.init($('#chart_1')[0]);
	option1 = barStr;
	option1.xAxis.data = LivingListData['chart1'].name
	option1.series[0].data = LivingListData['chart1'].data
	chart1.setOption(option1,{notMerge:true})

	var chart2 = echarts.init($('#chart_2')[0]);
	option2 = pieStr;
	option2.legend.data = LivingListData['chart2'].name
	option2.series[0].data = LivingListData['chart2'].data
	option2.legend.top = '10%';
	option2.legend.itemGap = 15;
	option2.color = piecolor4
	chart2.setOption(option2,{notMerge:true})

	var chart3 = echarts.init($('#chart_3')[0]);
	option3 = barStr;
	option3.xAxis.data = LivingListData['chart3'].name;
	option3.series[0].data = LivingListData['chart3'].data;
	chart3.setOption(option3,{notMerge:true});
}